package com.ycu.jk16.mall.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ycu.jk16.mall.dao.ShippingDao;
import com.ycu.jk16.mall.domain.Shipping;
import com.ycu.jk16.mall.service.ShippingService;

@Service("shippingService")
public class ShippingServiceImpl implements ShippingService{
	/**
	 * 注入持久层对象
	 */
	@Autowired
	private ShippingDao shippingDao;
	
//	@Override
//	public Integer countShipping(Integer userId) {
//		return shippingDao.countShipping(userId);
//	}
//	@Override
//	public List<Shipping> getShippingByUserId(Integer userId) {
//		return shippingDao.selectByUserId(userId);
//	}
	@Override
	public void updateShipping(Shipping shipping) {
		shippingDao.updateShipping(shipping);
	}
	@Override
	public void insertShipping(Shipping shipping) {
		shippingDao.insertShipping(shipping);
	}
	@Override
	public void deleteShiping(Integer id) {
		shippingDao.deleteShipping(id);
	}
	@Override
	public Shipping getShippingById(Integer id) {
		return shippingDao.selectById(id);
	}
	@Override
	public Integer countShipping(Integer userId) {
		return shippingDao.countShipping(userId);
	}
	@Override
	public List<Shipping> getShippingList(Map<String, Object> params) {
		return shippingDao.selectShippingWithParam(params);
	}
	
	
	

}
